import Store from './index'

const checkMap = {
    account: "user/SET_USER_ACCOUNT",
    userInfo: "user/SET_USER_INFO",
    tempLinkSysUserId: "shop/SET_TEMP_LINK_SYS_USERID",
    shopInfo: "shop/SET_SHOP_INFO",
};

const check = () => {
    Object.keys(checkMap).forEach(key => {
        let storage;
        storage = uni.getStorageSync(key)
        if (storage) {
            Store.commit(checkMap[key], storage);
        }
    })
}
export default check
